#!/bin/awk -f
#

BEGIN {
	RS = "\r\n\r\n"
	FS = "\r\n"
	ct = 0
}

{
	split($1,f,/[ \t]+/)
	pin = f[1]
	p144 = f[5]
	if (p144 ~ /^[0-9]+$/) {
		printf "%d,%s",p144,pin
		for (i=3; i<=NF; i++) printf ",%s",$i
		printf "\n"
	}
}

END {
	print "done"
}